package org.xukai.remoting.redis;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPubSub;

/**
 * @author xukai
 * @desc
 * @date 2017-01-02-下午 3:31
 */
public class MyListener extends JedisPubSub{

    public void onMessage(String channel, String message) {
    }

    public void onSubscribe(String channel, int subscribedChannels) {
    }

    public void onUnsubscribe(String channel, int subscribedChannels) {
    }

    public void onPSubscribe(String pattern, int subscribedChannels) {
    }

    public void onPUnsubscribe(String pattern, int subscribedChannels) {
    }

    public void onPMessage(String pattern, String channel,
                           String message) {
    }


    public static void main(String[] args) {
        Jedis jedis = new Jedis("192.168.252.128",6379);
        MyListener l = new MyListener();
        jedis.subscribe(l, "foo");
    }




}
